package controller;

import gui.KaduGui;
import java.awt.Component;
import java.awt.Point;
import java.awt.event.MouseEvent;
import javax.swing.event.MouseInputListener;

/**
 * @author Joachim
 * @use Actionlistener for mouse actions
 * @param KaduGui
 */

public class MyMouseListener implements MouseInputListener {
	public KaduGui kadugui;
	Point mouseClicked;
	Point mouseEntered;
	Point mouseExited;
	Point mousePressed; 
	int mouseButtonClicked,mouseDragged, mouseReleased;
	Component c;

	public MyMouseListener(KaduGui kaduGui) {
		// TODO Auto-generated constructor stub
		this.kadugui = kaduGui;
	}

	@Override
	public void mouseClicked(MouseEvent mouse) {
		mouseClicked = mouse.getPoint();
		mouseButtonClicked = mouse.getButton();
		System.out.println("mouse clicked : ")    ;
		
	}

	@Override
	public void mouseEntered(MouseEvent mouse) {
		mouseEntered = mouse.getPoint();
		System.out.println("mouse entered : ")    ;
	}

	@Override
	public void mouseExited(MouseEvent mouse) {
		mouseExited = mouse.getPoint();
		System.out.println("mouse exited : "+mouseExited)    ;
	}

	@Override
	public void mousePressed(MouseEvent mouse) {
		mousePressed = mouse.getPoint();
		System.out.println("mouse pressed : "+mousePressed);
	}

	@Override
	public void mouseReleased(MouseEvent mouse) {
		mouseReleased = mouse.getButton();
		System.out.println("mouse released : "+mouseReleased);
		
	}

	@Override
	public void mouseDragged(MouseEvent mouse) {
		mouseDragged = mouse.getButton();
		System.out.println("mouse dragged : "+mouseDragged);
		
	}

	@Override
	public void mouseMoved(MouseEvent mouse) {
		Component c = mouse.getComponent();
		System.out.println("mouse moved : " + c.getName());
		
	}

}
